﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace LRS.DAL
{
    public static class dConfiguration
    {
        public static string GetPropertyValue(string PropertyName)
        {
            string result = "";
            SqlDataReader reader = SqlHelper.ExecuteReader("Select PropertyValue from Configuration WHERE PropertyName='" + PropertyName + "'");
            if (reader.Read())
            {
                result = reader["PropertyValue"].ToString();
            }
            reader.Close();
            return result;
        }
        public static void ChangePropertyValue(string PropertyName, string value)
        {
            SqlHelper.ExecuteNonQuery("Update Configuration set PropertyValue='" + value + "' WHERE PropertyName='" + PropertyName + "'");
        }
    }
}
